import http from '@/utils/common/http'

/**
 * 普通密码方式登录
 * */
export async function login (data) {
  return http({
    method: 'post',
    url: '/auth/login',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 普通密码方式注销
 * */
export async function logout (data) {
  return http({
    method: 'post',
    url: '/auth/user/logout',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * JWT方式登录
 * */
export async function loginByJWT (data) {
  return http({
    method: 'post',
    url: '/auth/login/byJWTToken',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}
